﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
namespace ChuanPlus
{
    public class ProductionDetails : XPLiteObject
    {
        int fProductionDetailsID;
        [Key(true)]
        public int ProductionDetailsID
        {
            get { return fProductionDetailsID; }
            set { SetPropertyValue<int>("ProductionDetailsID", ref fProductionDetailsID, value); }
        }
        Production fProductionID;
        [Association("Production-ProductionDetails")]
        public Production ProductionID
        {
            get { return fProductionID; }
            set { SetPropertyValue<Production>("ProductionID", ref fProductionID, value); }
        }
        Stock fStockID;
        public Stock StockID
        {
            get { return fStockID; }
            set { SetPropertyValue<Stock>("StockID", ref fStockID, value); }
        }
        string fFormular;
        [Size(50)]
        public string Formular
        {
            get { return fFormular; }
            set { SetPropertyValue<string>("Formular", ref fFormular, value); }
        }
        double fActualUsed;
        public double ActualUsed
        {
            get { return fActualUsed; }
            set { SetPropertyValue<double>("ActualUsed", ref fActualUsed, value); }
        }
        public ProductionDetails(Session session) : base(session) { }
        public ProductionDetails() : base(Session.DefaultSession) { }
        /// <summary>
        /// Initializes a new instance of the ProductionDetails class.
        /// </summary>
        /// <param name="fProductionDetailsID"></param>
        /// <param name="fID"></param>
        /// <param name="fFormular"></param>
        /// <param name="fActualUsed"></param>
        public ProductionDetails(Session session, Stock fStockID, string fFormular, double fActualUsed)
            : base(session)
        {
            
            this.fStockID = fStockID;
            this.fFormular = fFormular;
            this.fActualUsed = fActualUsed;
        }
        public override void AfterConstruction() { base.AfterConstruction(); }
    }
}
